package com.myjavalab.dotsandboxes;

public class DotsAndBoxes {

	/**
	 * @param args
	 */
	public static void main(String[] args) {

		System.out.println(" Game started!");
		System.out.println("Note: enter the row and column to notify where you want to put a '-' or  '|' ");
		System.out.println("");
		Board b = new Board(4);
		User user = new User(b);
		Computer computer = new Computer(b);
		while (!b.isGameEnd()) {
			if(Board.USER_SIGN == b.getCurrentPlayer()){				
				user.play();
			}else {				
				computer.play();
			}
		}
		int userScore = b.getUserScore();
		int computerScore = b.getComputerScore();
		System.out.println("User score : " + userScore);
		System.out.println("Computer score : " + computerScore);
		if(userScore > computerScore){
			System.out.println("You Win!");
		}
		if(computerScore > userScore){
			System.out.println("You Lost!");
		}
	}

}
